package com.erms.lab.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.erms.lab.mapper.SysCompetitionMapper;
import com.erms.lab.domain.SysCompetition;
import com.erms.lab.service.ISysCompetitionService;
import com.erms.common.core.text.Convert;

/**
 * 承办竞赛情况Service业务层处理
 * 
 * @author guo
 * @date 2020-03-22
 */
@Service
public class SysCompetitionServiceImpl implements ISysCompetitionService 
{
    @Autowired
    private SysCompetitionMapper sysCompetitionMapper;

    /**
     * 查询承办竞赛情况
     * 
     * @param comId 承办竞赛情况ID
     * @return 承办竞赛情况
     */
    @Override
    public SysCompetition selectSysCompetitionById(Long comId)
    {
        return sysCompetitionMapper.selectSysCompetitionById(comId);
    }

    /**
     * 查询承办竞赛情况列表
     * 
     * @param sysCompetition 承办竞赛情况
     * @return 承办竞赛情况
     */
    @Override
    public List<SysCompetition> selectSysCompetitionList(SysCompetition sysCompetition)
    {
        return sysCompetitionMapper.selectSysCompetitionList(sysCompetition);
    }

    /**
     * 新增承办竞赛情况
     * 
     * @param sysCompetition 承办竞赛情况
     * @return 结果
     */
    @Override
    public int insertSysCompetition(SysCompetition sysCompetition)
    {
        return sysCompetitionMapper.insertSysCompetition(sysCompetition);
    }

    /**
     * 修改承办竞赛情况
     * 
     * @param sysCompetition 承办竞赛情况
     * @return 结果
     */
    @Override
    public int updateSysCompetition(SysCompetition sysCompetition)
    {
        return sysCompetitionMapper.updateSysCompetition(sysCompetition);
    }

    /**
     * 删除承办竞赛情况对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysCompetitionByIds(String ids)
    {
        return sysCompetitionMapper.deleteSysCompetitionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除承办竞赛情况信息
     * 
     * @param comId 承办竞赛情况ID
     * @return 结果
     */
    @Override
    public int deleteSysCompetitionById(Long comId)
    {
        return sysCompetitionMapper.deleteSysCompetitionById(comId);
    }
}
